<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>Environment Variables</TITLE>
<LINK REL="STYLESHEET" HREF="manual.css">
</HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#00003F" ALINK="#FF0000">
<DIV CLASS="body">

<DIV ALIGN="CENTER">
 <A HREF="http://nanoweb.si.kz/"><IMG BORDER="0" SRC="/icons/nanoweb.png" ALT="[NANOWEB DOCUMENTATION]"></A>
 <H3><SMALL>NANOWEB</SMALL>, the aEGiS PHP web server</H3>
</DIV>

<H1 ALIGN="CENTER">Environment/Nanoweb Variables</H1>

Following variables will be exported to environment for every cgi executed,
and they are also available as <KBD>%VARNAME</KBD> in many directives
(those who allow to specify response messages as
<A HREF="core.html#loadlimiterrormessage">LoadLimitErrorMessage</A>, or in the
<A HREF="core.html#rewriterule">RewriteRule</A> directive for example):

<DL>

   <DT>SERVER_NAME</DT>
     <DD>www.example.com</DD>

   <DT>SERVER_SOFTWARE</DT>
   <DT>SERVER_API</DT>
   <DT>SERVER_ADMIN</DT>
   <DT>SERVER_PROTOCOL</DT>
   <DT>SERVER_ADDR</DT>
   <DT>SERVER_PORT</DT>
     <DD>are describing the server</DD>

   <DT>REMOTE_ADDR</DT>
   <DT>REMOTE_PORT</DT>
     <DD>informations about the client</DD>

   <DT>DOCUMENT_ROOT</DT>
     <DD>where most pages come from</DD>

   <DT>PATH_TRANSLATED</DT>
   <DT>SCRIPT_FILENAME</DT>
     <DD>contain the real path of the script</DD>

   <DT>REQUEST_URI</DT>
     <DD>contains the real request uri</DD>

   <DT>SCRIPT_NAME</DT>
     <DD>the uri fully rewritten according to rewriterules / multiviews</DD>

   <DT>REDIRECT_URL</DT>
     <DD>is required for compatibility with the Apache-CGI-SAPI PHP interpreter</DD>

   <DT>PATH_INFO</DT>
     <DD>any additonal path that was supplied to the CGI</DD>

   <DT>REQUEST_METHOD</DT>
     <DD>may be GET or POST</DD>

   <DT>QUERY_STRING</DT>
     <DD>the cgi parameters sent via GET</DD>

   <DT>CONTENT_LENGTH</DT>
     <DD>the length of data on STDIN submitted in a POST request</DD>

   <DT>HTTP_*</DT>
     <DD>most other headers of the http request are made available as
         environment variables with a name of the form like HTTP_WHATEVER,
         common are HTTP_ACCEPT_LANGUAGE, HTTP_ACCEPT, HTTP_X_FORWARDED_FOR,
         HTTP_USER_AGENT</DD>

</DL>

<br>

Anything you add with the <A HREF="core.html#addservervar">AddServerVar</A>
will most always appear in the CGI environment, too.

<br>

<br>
<BR><HR NOSHADE COLOR="#063239">
 <H3 ALIGN="CENTER"> <SMALL>NANOWEB</SMALL>, the aEGiS PHP web server </H3>
<DIV CLASS="navline"><A HREF="index.html">Index</A> &nbsp; <A HREF="modules.html">Modules</A> &nbsp; <A HREF="core.html">Configuration</A> &nbsp; <A HREF="../">READMEs</A> &nbsp; <A HREF="faq.html">FAQ</A> &nbsp; <A HREF="http://forums.t0x.net/viewforum.php?f=1">Support Forum</A></DIV>

</DIV>
</BODY>
</HTML>
